<template>
    <el-dropdown trigger="click" @command="handleCommand" v-if="list.length>0" >
        <el-button :size="size">
            常用语<i class="el-icon-arrow-down el-icon--right"></i>
        </el-button>
        <el-dropdown-menu slot="dropdown">
            <template  v-for="(item,index) in list">
            <el-dropdown-item :command="item.suggestion" :key="index">{{item.text}}</el-dropdown-item>
            </template>
        </el-dropdown-menu>
    </el-dropdown>
</template>
<script>
    export default {
        name: "MoreMsgFixed",
        components: {},
        props:{
            size:{
                type:String,
                default:"mini"
            }
        },
        data() {
            return {
                list:[{text:"同意",suggestion:"同意"},{text:"不同意",suggestion:"不同意"},{text:"请审批",suggestion:"请审批"},{text:"已阅",suggestion:"已阅"},{text:"办理",suggestion:"办理"}]
            };
        },
        created() {
        },
        methods: {
            handleCommand(command) {
                this.$emit("setSuggestion",command)
            },
        }
    };
</script>
<style lang="scss" scoped>
</style>

